import Builder.Zh0202ComputerBuilder;
import director.Zh0202ComputerDirector;
import product.Zh0202Computer;

/**
 * @author: zh
 * @date: 2021/11/18 11:30
 * @version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        Zh0202ComputerBuilder cb1= (Zh0202ComputerBuilder) XMLUtil.getBean(0);
        Zh0202ComputerBuilder cb2= (Zh0202ComputerBuilder) XMLUtil.getBean(1);
        Zh0202ComputerBuilder cb3= (Zh0202ComputerBuilder) XMLUtil.getBean(2);
        Zh0202ComputerDirector director1 = new Zh0202ComputerDirector();
        Zh0202ComputerDirector director2 = new Zh0202ComputerDirector();
        Zh0202ComputerDirector director3 = new Zh0202ComputerDirector();
        director1.setCb(cb1);
        director2.setCb(cb2);
        director3.setCb(cb3);
        Zh0202Computer computer1 = director1.construct();
        Zh0202Computer computer2 = director2.construct();
        Zh0202Computer computer3 = director3.construct();
        System.out.println(computer1);
        System.out.println(computer2);
        System.out.println(computer3);
    }
}
